unsigned program::parse_NewCharValue(unsigned i)
{
   if ( at(i) == '\'' )
   {
      i ++; // move onto argument
      if ( at(i) == '\\' )
      {
         i ++; // move to second char in case of backslash
         tempchar = getDelimitedChar(at(i));
      }
      else
      {
         tempchar = at(i);
      }
   }
   else { cout << "Unexpected argument for command \"c\" at location " << i << endl << "Expected \'value\'."; }
   
   i += 2; // move over closing delimiter onto name delim
         
   if ( at(i) == '\"' )
      {
      i ++; // move onto first character
      while ( at(i) != '\"' )
      {
         tempname.push_back(at(i));
         i ++; // read character, move to next
      }
            
      if ( nameExists(tempname) )
      {
         cout << "Variable name \"";
         printVector(tempname);
         cout << "\" at position " << i << " was previously defined in this program.";
      }
      else
      {
         cnames.push_back(tempname);
         chars.push_back(tempchar);
      }
   }
   else { cout << "Unexpected argument for command \"c\" at location " << i << endl << "Expected \"name\"."; }
   return i;
}

unsigned program::parse_NewIntValue(unsigned i)
{
   if ( at(i) == '\'' )
   {
      i ++; // move inside delimiter
      while ( at(i) != '\'' ) // until end of delimiter is reached
      {
         digits.push_back(at(i)-48); // push back present digit
         i ++; // move through digits
      }
      for ( unsigned int j = 0; j < digits.size(); j ++ )
      {
         tempint += digits[j]*powerOfTen(digits.size()-j-1);
      }
      i ++; // move to next argument
   }
   else { cout << "Unexpected argument for command \"i\" at location " << i << endl << "Expected \'value\'."; }
   
   if ( at(i) == '\"' )
   {
      i ++; // move inside delimiter
      while ( at(i) != '\"' ) // until end of delimited portion
      {
         tempname.push_back(at(i)); // add character to name
         i ++; // move through characters
      }

      if ( nameExists(tempname) )
      {
         cout << "Variable name \"";
         printVector(tempname);
         cout << "\" at position " << i << " was previously defined in this program.";
      }
      else
      {
         inames.push_back(tempname);
         ints.push_back(tempint);
      }
   }
   else { cout << "Unexpected argument for command \"i\" at location " << i << endl << "Expected \"name\"."; }
   return i;
}
